package logm

import (
	"log"
	"os"
)

var (
	Smile   *log.Logger
	Sad     *log.Logger
	Serious *log.Logger
)

func NewLogger(logFile string) {
	file, err := os.OpenFile(logFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0666)
	if err != nil {
		log.Fatalln("create file log failed:", err)
	}
	//defer file.Close()
	Smile = log.New(file, "☺☺☺", log.Lshortfile|log.Ltime)
	Sad = log.New(file, "☹☹☹", log.Lshortfile|log.Ltime)
	Serious = log.New(file, "☠☠☠", log.Lshortfile|log.Ltime)
}
